define show_stack
    print $argc
    if $argc >= 1
        set $depth = $arg0
    else
        set $depth = 5
    end

    set $i = 0

    while $i < $depth
        printf "[esp + %d]: %x\n", 4*$i, *(uint32_t)((char*)$esp + 4*$i)
        set $i = 1 + $i
    end
end
